000001121215      //************************************************************************//
000002121215      //  Modulename:     OARPGGMOD
000003121215      //  Description:    Templates for RPG Procedures
000004121215      //
000005121215      //  Date:           2012-12-15
000006121215      //  Author:         Saman Neinawaie
000007121215      //
000008121215      //  Procedures:     IsVldObjRef
000009121215      //
000010121215      //************************************************************************//
000011121215
000013121215
000014121215      /Copy QPRTSRC,OARPGMOD
000015121215
000100121215      //------------------------------------------------------------------------
000102121215      // Is Valid Object Reference
000103121215      //------------------------------------------------------------------------
000105121215     PIsVldObjRef      B                   Export
000106121215
000107121215      // Procedure Interface
000109121215     D IsVldObjRef     PI            10I 0                                      1 = Ok / 0 = not Ok
000110121215     D  p_RefId                      10I 0 Const                                Reference Id
000111121215     D  p_OldRec                       N   Const Options(*NoPass)               Include old Records
000112121215
000113121215      // local Variables
000114121215     D l_OldRec        S                   Like(p_OldRec)
000115121215
000116121215      /Free
000117121215
000118121215        If p_Refid = *Blank;
000119121215          Return 0;
000120121215        EndIf;
000121121215
000122121215        If %addr(p_OldRec) = *Null;
000123121215          l_OldRec = p_OldRec;
000124121215        EndIf;
000125121215
000126121215        If l_OldRec;
000127121215          //Code;
000128121215        EndIf;
000129121215
000130121215        Return 1;
000131121215      /End-Free
000132121215      /Copy QCPYSRC,PSSR
000133121215     P                 E
